package com.zyp.Memenoto;


/**
 * 
 *		主要角色
 */
public class Original {

	
	//状态
	private String state;
	
	public Original(String state){
		this.state=state;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	//创建一个memeto对象，将此对象保存在内存中
	public Memento createMemo(){
		return new Memento(state);
	}
	
	//重新恢复之前的状态
	public void restoreMemento(Memento memo){
		this.state=memo.getState();
	}
	
	
}
